import request from './request'
export const getgroup = (params) => {
  return request({
    url: '/api/leader/classPage',
    method: 'GET',
    params
  })
}

export const getgroupfromname = (params) => {
  return request({
    url: '/api/leader/classList',
    method: 'GET',
    params
  })
}

export const editgroup = (params) => {
  return request({
    url: '/api/leader/class',
    method: 'PUT',
    params
  })
}

export const deletegroup = (gid) => {
  return request({
    url: `/api/leader/class/${gid}`,
    method: 'DELETE'
  })
}

export const getgroupstu = (gid) => {
  return request({
    url: `/api/leader/classStu/${gid}`,
    method: 'GET'
  })
}

export const deleteuserfromgroup = (params) => {
  return request({
    url: '/api/leader/classStu',
    method: 'DELETE',
    params
  })
}

export const creategroup = (data) => {
  return request({
    url: '/api/leader/class',
    method: 'POST',
    data
  })
}
